<!DOCTYPE html>





<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 3.9.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=7.4.0">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=7.4.0">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=7.4.0">
  <link rel="mask-icon" href="/images/logo.svg?v=7.4.0" color="#222">

<link rel="stylesheet" href="/css/main.css?v=7.4.0">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css?v=4.7.0">


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '7.4.0',
    exturl: false,
    sidebar: {"position":"left","display":"post","offset":12,"onmobile":false},
    copycode: {"enable":false,"show_result":false,"style":null},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    bookmark: {"enable":false,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    algolia: {
      appID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},
    path: '',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    translation: {
      copy_button: '复制',
      copy_success: '复制成功',
      copy_failure: '复制失败'
    },
    sidebarPadding: 40
  };
</script>


<script data-ad-client="ca-pub-8048531516491146" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

  <meta name="description" content="前阵子在公司电脑上配置好了Octopress博客，但是想在家里的Mac上使用，开始以为简单的将仓库clone就可以了，不幸的是我想的太简单。后来在网上看到了前面列出的第一篇文章，终于解决问题。 一、Octopress目录结构Octopress的仓库目录下有两个branch，source和master。  source分支下保存Octopress的源代码，我们需要用他们生成博客，该分支保存在Octo">
<meta name="keywords" content="octopress, 博客 ,octopress多电脑使用 ,Mac">
<meta property="og:type" content="article">
<meta property="og:title" content="让Octopress博客在多台Mac上同时使用">
<meta property="og:url" content="http://foogry.org/2014/04/02/2014-04-02-ru-he-pei-zhi-rang-ni-de-octopressbo-ke-zai-duo-tai-macshang-tong-shi-shi-yong/index.html">
<meta property="og:site_name" content="foogry的技术博客">
<meta property="og:description" content="前阵子在公司电脑上配置好了Octopress博客，但是想在家里的Mac上使用，开始以为简单的将仓库clone就可以了，不幸的是我想的太简单。后来在网上看到了前面列出的第一篇文章，终于解决问题。 一、Octopress目录结构Octopress的仓库目录下有两个branch，source和master。  source分支下保存Octopress的源代码，我们需要用他们生成博客，该分支保存在Octo">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://github-images.s3.amazonaws.com/help/settings/userbar-account-settings.png">
<meta property="og:image" content="https://github-images.s3.amazonaws.com/help/settings/settings-sidebar-ssh-keys.png">
<meta property="og:image" content="https://github-images.s3.amazonaws.com/help/settings/ssh-add-ssh-key.png">
<meta property="og:image" content="https://github-images.s3.amazonaws.com/help/settings/ssh-add-key.png">
<meta property="og:updated_time" content="2019-09-24T12:14:54.774Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="让Octopress博客在多台Mac上同时使用">
<meta name="twitter:description" content="前阵子在公司电脑上配置好了Octopress博客，但是想在家里的Mac上使用，开始以为简单的将仓库clone就可以了，不幸的是我想的太简单。后来在网上看到了前面列出的第一篇文章，终于解决问题。 一、Octopress目录结构Octopress的仓库目录下有两个branch，source和master。  source分支下保存Octopress的源代码，我们需要用他们生成博客，该分支保存在Octo">
<meta name="twitter:image" content="https://github-images.s3.amazonaws.com/help/settings/userbar-account-settings.png">
  <link rel="canonical" href="http://foogry.org/2014/04/02/2014-04-02-ru-he-pei-zhi-rang-ni-de-octopressbo-ke-zai-duo-tai-macshang-tong-shi-shi-yong/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: false,
    isPost: true,
    isPage: false,
    isArchive: false
  };
</script>

  <title>让Octopress博客在多台Mac上同时使用 | foogry的技术博客</title>
  


  <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?2944231de73b405a5da5c6b4097cfa0e";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">
  <div class="container use-motion">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">foogry的技术博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
        <h1 class="site-subtitle" itemprop="description">Stay hungry,stay foolish.</h1>
      
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
      
      
      
        
        <li class="menu-item menu-item-home">
      
    

    <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-archives">
      
    

    <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-about">
      
    

    <a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i> <br>关于</a>

  </li>
  </ul>

</nav>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
            

          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
      <article itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block post">
    <link itemprop="mainEntityOfPage" href="http://foogry.org/2014/04/02/2014-04-02-ru-he-pei-zhi-rang-ni-de-octopressbo-ke-zai-duo-tai-macshang-tong-shi-shi-yong/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="foogry">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="foogry的技术博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">让Octopress博客在多台Mac上同时使用

          
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              
                
              

              <time title="创建时间：2014-04-02 14:28:35" itemprop="dateCreated datePublished" datetime="2014-04-02T14:28:35+08:00">2014-04-02</time>
            </span>
          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2019-09-24 20:14:54" itemprop="dateModified" datetime="2019-09-24T20:14:54+08:00">2019-09-24</time>
              </span>
            
          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Octopress/" itemprop="url" rel="index"><span itemprop="name">Octopress</span></a></span>

                
                
              
            </span>
          

          
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
        
      
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2014/04/02/2014-04-02-ru-he-pei-zhi-rang-ni-de-octopressbo-ke-zai-duo-tai-macshang-tong-shi-shi-yong/#comments" itemprop="discussionUrl"><span class="post-comments-count valine-comment-count" data-xid="/2014/04/02/2014-04-02-ru-he-pei-zhi-rang-ni-de-octopressbo-ke-zai-duo-tai-macshang-tong-shi-shi-yong/" itemprop="commentCount"></span></a>
  </span>
  
  

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>前阵子在公司电脑上配置好了Octopress博客，但是想在家里的Mac上使用，开始以为简单的将仓库clone就可以了，不幸的是我想的太简单。后来在网上看到了前面列出的第一篇文章，终于解决问题。</p>
<h2 id="一、Octopress目录结构"><a href="#一、Octopress目录结构" class="headerlink" title="一、Octopress目录结构"></a>一、Octopress目录结构</h2><p>Octopress的仓库目录下有两个branch，<code>source</code>和<code>master</code>。</p>
<ul>
<li><p><code>source</code>分支下保存Octopress的源代码，我们需要用他们生成博客，该分支保存在Octopress本地仓库的根目录下；</p>
</li>
<li><p><code>master</code>分支下保存生成的博客内容，该分支在Octopress本地仓库的根目录下一个叫<code>_deploy</code>得文件夹中。该文件夹是以下划线开头的，会在执行<code>git push origin source</code>命令时被忽略，这也是为什么一个目录中能同时存在两个不同分支的文件夹的原因。</p>
</li>
</ul>
<a id="more"></a>


<h2 id="二、在本地重建Octopress仓库"><a href="#二、在本地重建Octopress仓库" class="headerlink" title="二、在本地重建Octopress仓库"></a>二、在本地重建Octopress仓库</h2><p>需要执行以下命令：</p>
<h4 id="1-clone-source分支"><a href="#1-clone-source分支" class="headerlink" title="1. clone source分支"></a>1. clone <code>source</code>分支</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ git clone -b source git@github.com:username/username.github.com.git octopress</span><br></pre></td></tr></table></figure>

<p>别忘了<code>username</code>替换成你自己github用户名。<br>另外还要注意的是，clone的地址不能是<code>http</code>而必须得是<code>ssh</code>的。</p>
<p>如果执行时提示以下错误：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">Cloning into &apos;octopress&apos;...</span><br><span class="line">The authenticity of host &apos;github.com (192.30.252.131)&apos; can&apos;t be established.</span><br><span class="line">RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.</span><br><span class="line">Are you sure you want to continue connecting (yes/no)? yes</span><br><span class="line">Warning: Permanently added &apos;github.com,192.30.252.131&apos; (RSA) to the list of known hosts.</span><br><span class="line">Permission denied (publickey).</span><br><span class="line">fatal: Could not read from remote repository.</span><br><span class="line"></span><br><span class="line">Please make sure you have the correct access rights</span><br><span class="line">and the repository exists.</span><br></pre></td></tr></table></figure>

<p>说明你的电脑不被github信任，需要在你电脑上创建<code>ssh key</code>并添加到github中。</p>
<p>这是你需要执行2；<br>如果没出现上述错误，直接执行3。</p>
<h4 id="2-创建并添加ssh-key"><a href="#2-创建并添加ssh-key" class="headerlink" title="2.创建并添加ssh key"></a>2.创建并添加ssh key</h4><h6 id="2-1-创建ssh-key"><a href="#2-1-创建ssh-key" class="headerlink" title="2.1 创建ssh key"></a>2.1 创建ssh key</h6><p>######## 2.1.1 生成key</p>
<p>执行命令：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ ssh-keygen -t rsa -C &quot;your_email@example.com&quot;</span><br></pre></td></tr></table></figure>

<p>会提示：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Generating public/private rsa key pair.</span><br><span class="line">Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]</span><br></pre></td></tr></table></figure>

<p>这时候按回车键(Enter)继续：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Enter passphrase (empty for no passphrase): [Type a passphrase]</span><br><span class="line"># Enter same passphrase again: [Type passphrase again]</span><br></pre></td></tr></table></figure>

<p>会要求你输入一个密码，4位以上，要记住，后面有用。</p>
<p>接下来会提示：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">Your identification has been saved in /Users/you/.ssh/id_rsa.</span><br><span class="line"># Your public key has been saved in /Users/you/.ssh/id_rsa.pub.</span><br><span class="line"># The key fingerprint is:</span><br><span class="line"># 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com</span><br></pre></td></tr></table></figure>

<p>到这里就说明key已经创建成功了。</p>
<p>######## 2.1.2 把生成的key添加到<code>ssh-agent</code>中</p>
<p>最后需要执行以下命令：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ ssh-add ~/.ssh/id_rsa</span><br></pre></td></tr></table></figure>

<h6 id="2-2-把生成的key添加到github"><a href="#2-2-把生成的key添加到github" class="headerlink" title="2.2 把生成的key添加到github"></a>2.2 把生成的key添加到github</h6><p>######## 2.2.1 copy key内容</p>
<p>先执行下面的命令：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pbcopy &lt; ~/.ssh/id_rsa.pub</span><br></pre></td></tr></table></figure>

<p>该命令将key中的内容copy到粘贴板中，以便后面使用。当然你也可以用自己的方式copy。</p>
<p>######## 2.2.2 找到添加key的地方</p>
<p>先点击<a href="https://github.com/settings" target="_blank" rel="noopener">Account Settings</a>：</p>
<p><img src="https://github-images.s3.amazonaws.com/help/settings/userbar-account-settings.png" alt="账户设置"></p>
<p>进入设置界面后，点击界面左侧的<a href="https://github.com/settings/ssh" target="_blank" rel="noopener">SSH KEYS</a>:</p>
<p><img src="https://github-images.s3.amazonaws.com/help/settings/settings-sidebar-ssh-keys.png" alt="ssh keys"></p>
<p>点击<code>Add SSH key</code>按钮：</p>
<p><img src="https://github-images.s3.amazonaws.com/help/settings/ssh-add-ssh-key.png" alt="add ssh key"></p>
<p>点击<code>Add key</code>按钮：</p>
<p><img src="https://github-images.s3.amazonaws.com/help/settings/ssh-add-key.png" alt="add key"></p>
<p>在输入框内粘贴刚才copy的key，点击确定即可。</p>
<h6 id="2-3-验证key可用性"><a href="#2-3-验证key可用性" class="headerlink" title="2.3 验证key可用性"></a>2.3 验证key可用性</h6><p>通过ssh github验证key是否可用：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ ssh -T git@github.com</span><br></pre></td></tr></table></figure>

<p>命令执行后会输出：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">The authenticity of host &apos;github.com (207.97.227.239)&apos; can&apos;t be established.</span><br><span class="line">RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.</span><br><span class="line">Are you sure you want to continue connecting (yes/no)?</span><br></pre></td></tr></table></figure>

<p>输入<code>yes</code>如果打印以下内容，就说明OK了：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Hi username! You&apos;ve successfully authenticated, but GitHub does not</span><br></pre></td></tr></table></figure>

<h4 id="3-clone-master分支"><a href="#3-clone-master分支" class="headerlink" title="3.clone master分支"></a>3.clone master分支</h4><p>下面需要将master分支clone到<code>_deploy</code>目录：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ cd octopress</span><br><span class="line">$ git clone git@github.com:username/username.github.com.git _deploy</span><br></pre></td></tr></table></figure>

<h4 id="4-配置环境"><a href="#4-配置环境" class="headerlink" title="4.配置环境"></a>4.配置环境</h4><p>执行以下命令配置环境：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ gem install bundler</span><br><span class="line">$ rbenv rehash    # If you use rbenv, rehash to be able to run the bundle command</span><br><span class="line">$ bundle install</span><br><span class="line">$ rake setup_github_pages</span><br></pre></td></tr></table></figure>

<p>执行最后一条命令时需要你输入github中博客仓库地址：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Enter the read/write url for your repository</span><br><span class="line">(For example, &apos;git@github.com:your_username/your_username.github.com)</span><br></pre></td></tr></table></figure>

<p>到此所有的工作都完成了，你就可以享受在两台电脑上使用Octopress了！</p>
<h2 id="三、Tips"><a href="#三、Tips" class="headerlink" title="三、Tips"></a>三、Tips</h2><h4 id="1-及时提交本地修改"><a href="#1-及时提交本地修改" class="headerlink" title="1. 及时提交本地修改"></a>1. 及时提交本地修改</h4><p>在每处配置了Octopress的地方，做了任何修改都要提交，否则另一个地方做了修改，本地更新的时候肯定会冲突。</p>
<p>每次在本地做完修改以后，都要及时提交，分别执行以下命令：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ rake generate</span><br><span class="line">$ rake deploy             # update the remote master branch</span><br></pre></td></tr></table></figure>

<p>第一条命令会使用本地的修改生成最新的blog网站，并且生成的blog会存放到<code>Octopress</code>根目录下的<code>public/</code>目录下；</p>
<p>第二条命令主要做了两件事：</p>
<ul>
<li><p>用<code>generate</code>命令生成在<code>public/</code>目录下的内容覆盖<code>_deploy/</code>目录下内容；</p>
</li>
<li><p>将<code>_deploy/</code>目录下的修改<code>add</code> 、 <code>commit</code>到git，并<code>push</code>到git的<code>master</code>分支。</p>
</li>
</ul>
<p>别以为这就结束了，你还得把source分支中做的修改提交的git仓库中，执行以下命令：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ git add .</span><br><span class="line">$ git commit -am &quot;Some comment here.&quot; </span><br><span class="line">$ git push origin source  # update the remote source branch</span><br></pre></td></tr></table></figure>

<p>执行完这两步后，稍过一会就能看到自己blog中的更新啦！</p>
<h4 id="2-修改前先更新到最新版本"><a href="#2-修改前先更新到最新版本" class="headerlink" title="2.修改前先更新到最新版本"></a>2.修改前先更新到最新版本</h4><p>为了以防万一，在本地做任何修改前都要先做更新，可以执行以下命令分别更新<code>source</code>和<code>master</code>分支：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ cd octopress</span><br><span class="line">$ git pull origin source  # update the local source branch</span><br><span class="line">$ cd ./_deploy</span><br><span class="line">$ git pull origin master  # update the local master branch</span><br></pre></td></tr></table></figure>

<h2 id="四、参考文档"><a href="#四、参考文档" class="headerlink" title="四、参考文档"></a>四、参考文档</h2><p>本文参考了以下两篇文章：</p>
<ul>
<li><p><a href="http://blog.zerosharp.com/clone-your-octopress-to-blog-from-two-places/" target="_blank" rel="noopener"><strong>Clone Your Octopress to Blog From Two Places</strong></a></p>
</li>
<li><p><a href="https://help.github.com/articles/generating-ssh-keys" target="_blank" rel="noopener"><strong>Generating SSH Keys</strong></a></p>
</li>
</ul>

    </div>

    
    
    
        
      
        <div id="reward-container">
  <div></div>
  <button id="reward-button" disable="enable" onclick="var qr = document.getElementById(&quot;qr&quot;); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">
        
      
      <div style="display: inline-block">
        <img src="/images/weixinpay.jpg" alt="foogry 微信支付">
        <p>微信支付</p>
      </div>

  </div>
</div>

      
        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>foogry</li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://foogry.org/2014/04/02/2014-04-02-ru-he-pei-zhi-rang-ni-de-octopressbo-ke-zai-duo-tai-macshang-tong-shi-shi-yong/" title="让Octopress博客在多台Mac上同时使用">http://foogry.org/2014/04/02/2014-04-02-ru-he-pei-zhi-rang-ni-de-octopressbo-ke-zai-duo-tai-macshang-tong-shi-shi-yong/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/deed.zh" rel="noopener" target="_blank"><i class="fa fa-fw fa-creative-commons"></i>BY-NC-ND</a> 许可协议。转载请注明出处！</li>
</ul>
</div>

      

      <footer class="post-footer">
          
            
          
          <div class="post-tags">
            
              <a href="/tags/octopress/" rel="tag"># octopress</a>
            
              <a href="/tags/博客/" rel="tag"># 博客</a>
            
          </div>
        

        

          <div class="post-nav">
            <div class="post-nav-next post-nav-item">
              
                <a href="/2014/03/31/2014-03-31-kai-shi-xie-blogla/" rel="next" title="开始写blog啦">
                  <i class="fa fa-chevron-left"></i> 开始写blog啦
                </a>
              
            </div>

            <span class="post-nav-divider"></span>

            <div class="post-nav-prev post-nav-item">
              
                <a href="/2014/04/25/2014-04-25-githubyou-xiu-xiang-mu-ios/" rel="prev" title="github优秀开源项目大全-iOS">
                  github优秀开源项目大全-iOS <i class="fa fa-chevron-right"></i>
                </a>
              
            </div>
          </div>
        
      </footer>
    
  </div>
  
  
  
  </article>

  </div>


          </div>
          
    
    <div class="comments" id="comments"></div>
  

        </div>
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">
        
        
        
        
      

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#一、Octopress目录结构"><span class="nav-number">1.</span> <span class="nav-text">一、Octopress目录结构</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#二、在本地重建Octopress仓库"><span class="nav-number">2.</span> <span class="nav-text">二、在本地重建Octopress仓库</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-clone-source分支"><span class="nav-number">2.0.1.</span> <span class="nav-text">1. clone source分支</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-创建并添加ssh-key"><span class="nav-number">2.0.2.</span> <span class="nav-text">2.创建并添加ssh key</span></a><ol class="nav-child"><li class="nav-item nav-level-6"><a class="nav-link" href="#2-1-创建ssh-key"><span class="nav-number">2.0.2.0.1.</span> <span class="nav-text">2.1 创建ssh key</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-2-把生成的key添加到github"><span class="nav-number">2.0.2.0.2.</span> <span class="nav-text">2.2 把生成的key添加到github</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-3-验证key可用性"><span class="nav-number">2.0.2.0.3.</span> <span class="nav-text">2.3 验证key可用性</span></a></li></ol></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-clone-master分支"><span class="nav-number">2.0.3.</span> <span class="nav-text">3.clone master分支</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-配置环境"><span class="nav-number">2.0.4.</span> <span class="nav-text">4.配置环境</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#三、Tips"><span class="nav-number">3.</span> <span class="nav-text">三、Tips</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-及时提交本地修改"><span class="nav-number">3.0.1.</span> <span class="nav-text">1. 及时提交本地修改</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-修改前先更新到最新版本"><span class="nav-number">3.0.2.</span> <span class="nav-text">2.修改前先更新到最新版本</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#四、参考文档"><span class="nav-number">4.</span> <span class="nav-text">四、参考文档</span></a></li></ol></div>
        
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">foogry</p>
  <div class="site-description" itemprop="description"></div>
</div>
  <nav class="site-state motion-element">
      <div class="site-state-item site-state-posts">
        
          <a href="/archives/">
        
          <span class="site-state-item-count">22</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-categories">
        
        <span class="site-state-item-count">8</span>
        <span class="site-state-item-name">分类</span>
        
      </div>
    
      
      
      <div class="site-state-item site-state-tags">
        
        <span class="site-state-item-count">56</span>
        <span class="site-state-item-name">标签</span>
        
      </div>
    
  </nav>
  <div class="cc-license motion-element" itemprop="license">
    
  
    <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/deed.zh" class="cc-opacity" rel="noopener" target="_blank"><img src="/images/cc-by-nc-nd.svg" alt="Creative Commons"></a>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">foogry</span>
</div>
  <div class="powered-by">Hosted by <a href="https://coding.net/pages" class="theme-link" rel="noopener" target="_blank">Coding Pages</a></div>
  <span class="post-meta-divider">|</span>
  <div class="powered-by">由 <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动 v3.9.0</div>
  <span class="post-meta-divider">|</span>
  <div class="theme-info">主题 – <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> v7.4.0</div>

        












        
      </div>
    </footer>
  </div>

  


  <script src="/lib/anime.min.js?v=3.1.0"></script>
  <script src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  <script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script src="/js/utils.js?v=7.4.0"></script><script src="/js/motion.js?v=7.4.0"></script>
<script src="/js/schemes/pisces.js?v=7.4.0"></script>
<script src="/js/next-boot.js?v=7.4.0"></script>



  





















  

  

  


<script>
NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
  var GUEST = ['nick', 'mail', 'link'];
  var guest = 'nick,mail,link';
  guest = guest.split(',').filter(item => {
    return GUEST.includes(item);
  });
  new Valine({
    el: '#comments',
    verify: false,
    notify: false,
    appId: 'vqsvFaA8FXndr4867HJvtJ7P-gzGzoHsz',
    appKey: '6L6ddsrLCJVMetc2W7CL9kkf',
    placeholder: 'Comment Here',
    avatar: 'mm',
    meta: guest,
    pageSize: '10' || 10,
    visitor: false,
    lang: 'zh-cn' || 'zh-cn',
    path: location.pathname
  });
}, window.Valine);
</script>

</body>
</html>
